<?php
class cms_members extends spModel
{
	var $pk    = "uid";
	var $table = "members";
	
	var $verifier_register = array(
		"rules" => array(
			'username' => array(
				'notnull' => TRUE,
				'minlength' => 3,
				'maxlength' => 15,
			),
			'password' => array(
				'notnull' => TRUE,
				'minlength' => 6,
				'maxlength' => 30,
			),
			'confirm' => array(
				'equalto' => 'password',
			),
			'email' => array(
				'notnull' => TRUE,
				'email' => TRUE,
			),
		),
		"messages" => array(
			'username' => array(
				'notnull' => "用户名不能为空",
				'minlength' => "用户名长度不能少于3个字符",
				'maxlength' => "用户名长度不能大于15个字符",
			),
			'password' => array(
				'notnull' => "密码不能为空",
				'minlength' => "密码长度不能少于6个字符",
				'maxlength' => "密码长度不能大于30个字符",
			),
			'confirm' => array(
				'equalto' => '两次输入的密码不一样',
			),
			'email' => array(
				'notnull' => "电子邮件不能为空",
				'email' => "电子邮件格式不正确",
			),
		),
	);
	
	var $verifier_login = array(
		"rules" => array(
			'username' => array(
				'notnull' => TRUE,
				'minlength' => 3,
				'maxlength' => 15,
			),
			'password' => array(
				'notnull' => TRUE,
				'minlength' => 6,
				'maxlength' => 30,
			),
		),
		"messages" => array(
			'username' => array(
				'notnull' => "用户名不能为空",
				'minlength' => "用户名长度不能少于3个字符",
				'maxlength' => "用户名长度不能大于15个字符",
			),
			'password' => array(
				'notnull' => "密码不能为空",
				'minlength' => "密码长度不能少于6个字符",
				'maxlength' => "密码长度不能大于30个字符",
			),
		),
	);
	
	public function acljump(){
		/* echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
		echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
		echo "<head>";
		echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";
		echo "<title>提示信息</title>";
		echo "<link href=\"/theme/default/css.css\" type=\"text/css\" rel=\"stylesheet\"/>";
		echo "</head>";
		echo "<body>";
		echo "<div class=\"tishi\">";
		echo "<h2>提示信息</h2>";
		echo "<div class=\"tishi-box\"><a href=\"" . spUrl("user","login") . "\">您没有权限进行此操作，请登录！</a></div>";
		echo "<div class=\"tishi-box\"><a href=\"" . spUrl("user","login") . "\">点击跳转</a></div>";
		echo "</div>";
		echo "</body>";
		echo "</html>"; */
		header( "Location: " . spUrl("user","login") );
		exit();
	}
}